package com.wu.foodsafetyplayer.app.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class AppVideoBackBean implements Parcelable {

    /**
     * result : 0
     * data : [{"deviceid":26,"channel":0,"start":"20210406-065356","stop":"20210406-081721"},{"deviceid":26,"channel":0,"start":"20210406-081721","stop":"20210406-081724"},{"deviceid":26,"channel":0,"start":"20210406-081724","stop":"20210406-092156"},{"deviceid":26,"channel":0,"start":"20210406-092156","stop":"20210406-092159"},{"deviceid":26,"channel":0,"start":"20210406-092159","stop":"20210406-102333"},{"deviceid":26,"channel":0,"start":"20210406-102333","stop":"20210406-102336"},{"deviceid":26,"channel":0,"start":"20210406-102336","stop":"20210406-113238"},{"deviceid":26,"channel":0,"start":"20210406-113238","stop":"20210406-113241"},{"deviceid":26,"channel":0,"start":"20210406-113241","stop":"20210406-123353"},{"deviceid":26,"channel":0,"start":"20210406-123353","stop":"20210406-123356"},{"deviceid":26,"channel":0,"start":"20210406-123356","stop":"20210406-134400"},{"deviceid":26,"channel":0,"start":"20210406-134400","stop":"20210406-134402"},{"deviceid":26,"channel":0,"start":"20210406-134403","stop":"20210406-144311"},{"deviceid":26,"channel":0,"start":"20210406-144311","stop":"20210406-144314"},{"deviceid":26,"channel":0,"start":"20210406-144314","stop":"20210406-154056"},{"deviceid":26,"channel":0,"start":"20210406-154056","stop":"20210406-154058"},{"deviceid":26,"channel":0,"start":"20210406-154058","stop":"20210406-164700"},{"deviceid":26,"channel":0,"start":"20210406-164700","stop":"20210406-164703"},{"deviceid":26,"channel":0,"start":"20210406-164703","stop":"20210406-174941"},{"deviceid":26,"channel":0,"start":"20210406-174941","stop":"20210406-174944"},{"deviceid":26,"channel":0,"start":"20210406-174944","stop":"20210406-194702"},{"deviceid":26,"channel":0,"start":"20210406-194703","stop":"20210406-194708"},{"deviceid":26,"channel":0,"start":"20210406-194708","stop":"20210407-000737"},{"deviceid":26,"channel":0,"start":"20210407-000737","stop":"20210407-000743"},{"deviceid":26,"channel":0,"start":"20210407-000743","stop":"20210407-043931"},{"deviceid":26,"channel":0,"start":"20210407-043931","stop":"20210407-043937"},{"deviceid":26,"channel":0,"start":"20210407-043937","stop":"20210407-074637"},{"deviceid":26,"channel":0,"start":"20210407-074637","stop":"20210407-074643"},{"deviceid":26,"channel":0,"start":"20210407-074643","stop":"20210407-090236"}]
     */

    public int result;
    public List<DataBean> data;

    public static class DataBean implements Parcelable {
        /**
         * deviceid : 26
         * channel : 0
         * start : 20210406-065356
         * stop : 20210406-081721
         */

        public int deviceid;
        public int channel;
        public String start;
        public String stop;


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.deviceid);
            dest.writeInt(this.channel);
            dest.writeString(this.start);
            dest.writeString(this.stop);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.deviceid = in.readInt();
            this.channel = in.readInt();
            this.start = in.readString();
            this.stop = in.readString();
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.result);
        dest.writeTypedList(this.data);
    }

    public AppVideoBackBean() {
    }

    protected AppVideoBackBean(Parcel in) {
        this.result = in.readInt();
        this.data = in.createTypedArrayList(DataBean.CREATOR);
    }

    public static final Creator<AppVideoBackBean> CREATOR = new Creator<AppVideoBackBean>() {
        @Override
        public AppVideoBackBean createFromParcel(Parcel source) {
            return new AppVideoBackBean(source);
        }

        @Override
        public AppVideoBackBean[] newArray(int size) {
            return new AppVideoBackBean[size];
        }
    };
}
